/* Let a[i][j] be the initial state of the board, where a[i][j] = 1 means
 * the square is 'on', and a[i][j] = 0 means the square is 'off'. Our task
 * is to turn all squares 'off'.
 *
 * Let x[i][j] be 1 if we need to flip square (i, j), or 0 if we don't flip
 * it. Then for each a[u][v], we have the following equation:
 *     sum (0 <= i, j <= 3) c[i][j]*x[i][j] == a[u][v] (mod 2),
 * where c[i][j] = 1 if and only if i = u or j = v.
 *
 * This is a system of 16 linear equations and can be solved using Gaussian
 * elimination. In addition, since the coefficients c[i][j] can only be 0 or
 * 1, we can use a simple bit-mask to represent all the coefficients.
 *
 * The above algorithm works for a board of any dimension M-by-N. However,
 * for cases where M+N is even and provided that a solution exist, there is
 * a simpler trick. This is because when you flip a square, you change the
 * on/off state of (M+N-1) squares, which is an odd number. So if the total
 * number of 'on' squares in a square's row or column is odd, then you must
 * flip the square for an odd number of times, which is 1; if the total is
 * even, then you must flip the square for an even number of times, which is
 * 0. Thus we can find the solution straight away without solving any 
 * equations.
 */

#include <stdio.h>

#define ROWS 4
#define COLS 4

#define MODE 0  /* 0: simple method; 1: gaussian elimination; 2: symbolic */

#if MODE == 0   /* simple trick */

int main()
{
    unsigned char a[ROWS][COLS], x[ROWS][COLS];
    int i, j, k, count = 0;

    for (i = 0; i < ROWS; i++)
    {
        char line[10];
        fgets(line, sizeof(line), stdin);
        for (j = 0; j < COLS; j++)
            a[i][j] = (line[j] == '+')? 1 : 0;
    }

    for (i = 0; i < ROWS; i++)
        for (j = 0; j < COLS; j++)
        {
            x[i][j] = a[i][j];
            for (k = 0; k < 4; k++)
            {
                x[i][j] ^= a[i][k];
                x[i][j] ^= a[k][j];
            }
            count += x[i][j];
        }

    printf("%d\n", count);
    for (i = 0; i < ROWS; i++)
        for (j = 0; j < COLS; j++)
            if (x[i][j])
                printf("%d %d\n", i + 1, j + 1);
    return 0;
}

#elif MODE == 1     /* numerical Gaussian elimination */

typedef unsigned short mask_t;  /* bit-mask of coefficients: 1=on, 0=off */

typedef struct equation
{
    mask_t coeff;           /* bit-mask of coefficients: 1=on, 0=off */
    unsigned char target;   /* target value: 1=on, 0=off */
    unsigned char which;    /* which a[i][j] this equation designates */
} equation;

/* Count the number of bits set in x. */
static int popcnt(mask_t x)
{
    int count = 0;
    while (x)
    {
        ++count;
        x &= (x - 1);
    }
    return count;
}

int main()
{
    int i, j, k;
    equation eq[16];
    mask_t x;   /* solution */

    /* Read initial state and build equations. */
    for (i = 0; i < 4; i++)
    {
        char line[10];
        fgets(line, sizeof(line), stdin);
        for (j = 0; j < 4; j++)
        {
            eq[i * 4 + j].which = (unsigned char)(i * 4 + j);
            eq[i * 4 + j].coeff = (0xf << (i * 4)) | (0x1111 << j);
            eq[i * 4 + j].target = (line[j] == '+')? 1 : 0;
        }
    }

    /* Solve the 16 equations using Gaussian elimination. */
    for (i = 0; i < 16; i++)
    {
        /* Find the first equation with a non-zero coefficient in x[i]. */
        for (k = i; k < 16; k++)
        {
            if (eq[k].coeff & (1 << i))
                break;
        }
        if (k == 16)    /* x[i] is free variable */
            continue;
        if (k != i)     /* swap equation i and k */
        {
            equation tmp = eq[i];
            eq[i] = eq[k];
            eq[k] = tmp;
        }

        /* Eliminate x[i] from all the equations below. */
        for (k = i + 1; k < 16; k++)
            if (eq[k].coeff & (1 << i))
            {
                eq[k].coeff ^= eq[i].coeff;
                eq[k].target ^= eq[i].target;
            }
    }

    /* Back-substitute to solve the unknowns. */
    x = 0;
    for (i = 15; i >= 0; i--)
    {
        int b = (popcnt(x & eq[i].coeff) & 1) ^ eq[i].target;
        if (eq[i].coeff & (1 << i)) /* not a free variable */
            x |= (b << i);
        else if (b)                 /* contradictory */
            return 1;
    }

    /* Display solution. */
    printf("%d\n", popcnt(x));
    for (i = 0; i < 4; i++)
        for (j = 0; j < 4; j++)
            if (x & (1 << (i * 4 + j)))
                printf("%d %d\n", i + 1, j + 1);
    return 0;
}

#elif MODE == 2     /* symbolic Gaussian elimination */

typedef unsigned short mask_t;  /* bit-mask of coefficients: 1=on, 0=off */

typedef struct equation
{
    mask_t coeff;   /* bit-mask of coefficients: 1=on, 0=off */
    mask_t target;  /* bit-mask of the a[i][j]s to XOR */
} equation;

/* Count the number of bits set in x. */
static int popcnt(mask_t x)
{
    int count = 0;
    while (x)
    {
        ++count;
        x &= (x - 1);
    }
    return count;
}

int main()
{
    int i, j, k;
    equation eq[ROWS*COLS];
    mask_t one = 1;

    /* Build equations according to the problem setup. */
    for (i = 0; i < ROWS; i++)
        for (j = 0; j < COLS; j++)
        {
            eq[i*COLS+j].coeff = (0xf << (i * COLS)) | (0x1111 << j);
            eq[i*COLS+j].target = one << (i*COLS+j);
        }

    /* Solve the equations using Gaussian elimination. */
    for (i = 0; i < ROWS*COLS; i++)
    {
        /* Find the first equation with a non-zero coefficient in x[i]. */
        for (k = i; k < ROWS*COLS; k++)
        {
            if (eq[k].coeff & (one << i))
                break;
        }
        if (k == ROWS*COLS) /* x[i] is free variable */
            continue;
        if (k != i)         /* swap equation i and k */
        {
            equation tmp = eq[i];
            eq[i] = eq[k];
            eq[k] = tmp;
        }

        /* Eliminate x[i] from all the equations below. */
        for (k = i + 1; k < ROWS*COLS; k++)
            if (eq[k].coeff & (one << i))
            {
                eq[k].coeff ^= eq[i].coeff;
                eq[k].target ^= eq[i].target;
            }
    }

    /* Back-substitute to keep only one term for each equation. */
    for (i = ROWS*COLS-1; i >= 0; i--)
    {
        if ((eq[i].coeff & (one << i)) == 0) /* free variable */
            continue;
        for (k = i - 1; k >= 0; k--)
        {
            if (eq[k].coeff & (one << i))
            {
                eq[k].coeff ^= eq[i].coeff;
                eq[k].target ^= eq[i].target;
            }
        }
    }

    /* Display solution. */
    for (i = 0; i < ROWS*COLS; i++)
    {
        if (eq[i].coeff & (one << i))
            printf("x[%d][%d] = ", i / COLS + 1, i % COLS + 1);
        else
            printf("      0 = ");

        for (k = 0; k < ROWS*COLS; k++)
            printf("%c", (eq[i].target & (one << k))? '1' : '0');
        printf("\n");
    }

    return 0;
}

#endif
